function particles = genParticles(xrange, yrange, num)

x = xrange(1) + rand(num, 1) * (xrange(2) - xrange(1));
y = yrange(1) + rand(num, 1) * (yrange(2) - yrange(1));
particles = [x y];